Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[generic_assert] "Constify" the Debug trait #135712

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

c410-f3r
Copy link
Contributor

@c410-f3r c410-f3r commented Jan 19, 2025

cc #44838

With the merging of #135423, it now appears possible to start "constifying" arbitrary traits. Therefore, I am starting the "constification" of all the traits involved in the execution of the formatting system to unblock generic_assert.

const _: () = { panic!("{}", "foo"); };

r? @rust-lang/project-const-traits

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 19, 2025
@compiler-errors
Copy link
Member

This is a duplicate of #134628.

@compiler-errors
Copy link
Member

compiler-errors commented Jan 19, 2025

And no, #135423 does not complete the picture unfortunately. We still need to enforce const stability of calls in MIR.

@c410-f3r
Copy link
Contributor Author

c410-f3r commented Jan 19, 2025

This is a duplicate of #134628.

Looks like #134628 is trying to constify Default as well as Debug?! There is a related code in https://github.com/rust-lang/rust/pull/134628/files#diff-9968f2500861825aa70c0aefa037007a3759556f8ff4e742c6d826117dc5740b but the file is a test.

And no, #135423 does not complete the picture unfortunately. We still need to enforce const stability of calls in MIR.

Oh, OK. Thanks for the heads up. I will be back when things are ready.

@c410-f3r c410-f3r closed this Jan 19, 2025
@compiler-errors
Copy link
Member

compiler-errors commented Jan 19, 2025

No, I'm so sorry @c410-f3r, I misread this as "constify the Default trait", not the Debug trait.

I will reopen this because I was blind and can't read the difference between Default and Debug. However, this is still blocked like that other one.

@c410-f3r
Copy link
Contributor Author

Don't worry! After all, keeping up with the relentless pace of delivering so many important features in short periods of time is no easy task and it takes its toll. BTW, looking forward to see the stabilization of RTN 🎉

@fee1-dead fee1-dead added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants